package com.longyu12.studydemo.controller;

import com.longyu12.studydemo.pojo.User;
import com.longyu12.studydemo.service.UserService;
import com.longyu12.studydemo.service.impl.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {
    @Autowired
    private UserServiceImpl userService;

    @RequestMapping("/getUserById")
    public User findUserById(Integer id) {
        return userService.findById(id);
    }
}
